/**
 * 
 */
package com.pinapel.aixml.models.xml.errorHandlers;

import java.util.Iterator;
import java.util.List;

import javax.xml.transform.dom.DOMResult;

import com.pinapel.aixml.models.xml.SvrlDomModel;
import com.pinapel.aixml.tools.log.EnumMessageType;
import com.pinapel.aixml.tools.log.Logger;

/**
 * @author Yoli
 *
 */
public class SchematronErrorReporter extends FullTransformErrorReporter {
	
	/**
	 * @param baseMessage
	 */
	public SchematronErrorReporter(String baseMessage) {
		super(baseMessage);
	}
	
	public void printSvrlFailedMessages(SvrlDomModel report) {
		List<String> fAsserts;
		fAsserts = report.getFailedAsserts();
		Iterator<String> iter = fAsserts.iterator();
		if(iter.hasNext()) {
			this.setError();
		}
		while(iter.hasNext()) {
			Logger.addMessage(EnumMessageType.ERROR, this.getBaseMessage()+ iter.next());
		}
	}
	

}
